home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
database
/
bdem22.zip
/
BDEMO015.TXT
< prev
next >
Wrap
Text File
|
1994-10-27
|
2KB
|
61 lines
BUILDER CONTROL FUNCTIONS
The Builder Control Functions Only Do Two Things.
1) Allow You to Create Clipper Applications That Will Time Out
After a Specified Period of Inactivity.
2) Allow the Left and Right Arrow Keys to Move From One Drop Down
Menu to the Next.
The TimeOut() Function was New in Builder Version 2.0. The Following
Small Code Example Sets Up an Inactivity Time Out for a Clipper 5.x
Program.
// First Setup a Hotkey to React to the
// Keypad Alt+5 Key.
SetKey(KP_ALT_5,{||ChkTimOut()})
// Initialize the Program to Time Out With One
// Hour of Consecutive Inactivity. If the Time Out
// Occurs, The Scan Code "8F00" Will be Placed in the
// Keyboard Buffer and the TimeOut() Function Will
// Return a Value of "Y".
TimeOut(3600,Hex2Dec("8F00"))
... Rest of Program Here
// Test for Time Out Condition
Func ChkTimOut()
If TimeOut() == "Y"
MsgBox("A System Time Out Has Occured")
Endi
Retu(NIL)
Once a Time Out has Occured, the TimeOut() Function Will Return a Value
of "Y". To Reset Timeout() (So it Will Return "N"), Pass 2 Non-Zero
Parameters. For Example, the Following Line of Code Would Reset the
TimeOut() Function for the Above Example:
// For Whatever Reason, We Don't Want to Exit the
// Program for this Time Out Condition, So We Will
// Reset it and Continue Time Out Monitoring.
TimeOut(3600,Hex2Dec("8F00"))
IMPORTANT NOTE: The TimeOut() function should NOT be used in a MS-Windows
DOS box. (OS/2 is ok). TimeOut() should be used in a DOS only environment
on a fast processor with at least 8MB of RAM.
The TtlKeyOn() and TtlKeyOff() Functions Control Left and Right Drop
Down Menu Scrolling. These Functions Are Placed in the Source Code by
Builder. To Disable Left/Right Drop Down Menu Scrolling, Simply Comment
Out or Remove the Calls to These Functions.
To Test This, Exit to the "Library Functions" Drop Down Menu and Press the
Right or Left Arrow Keys. Clicking on the Bar Menu Options Will Also
Cause This.
** End of File